#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>

#include <sys/types.h>
#include <unistd.h>

int main(){
	int fd=open("/etc/passwd",O_RDONLY);
	int size=0;
	size=lseek(fd,0,SEEK_END);
	printf("size=%d\n",size);

	lseek(fd,-20,SEEK_END);
	char buf[30]={0};
	read(fd,buf,30);
	printf("buf=%s\n",buf );

	close(fd);

}

